package com.cash.lemoloan.statisticlib.Utils;


import android.os.Environment;

import com.cash.lemoloan.statisticlib.StatisticApplication;

import java.io.File;




public class FileUtil {

    public static String getCachePath() {
        File externalCacheDir = StatisticApplication.getInstance().getExternalCacheDir();
        if (null != externalCacheDir) {
            return externalCacheDir.getAbsolutePath();
        }
        if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
            return Environment.getExternalStorageDirectory().getAbsolutePath();
        }
        return StatisticApplication.getInstance().getCacheDir().getAbsolutePath();
    }

}
